/* static/css/position.css */
.position-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.module-title {
    font-size: 1.5rem;
    color: #333;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    min-width: 80px; /* 设置最小宽度保持按钮大小一致 */
    text-align: center;
    transition: background-color 0.3s;
    text-decoration: none;
}

.btn-primary {
    background-color: #4a6cf7;
    color: white;
}

.btn-primary:hover {
    background-color: #3a5bd9;
}

.btn-export {
    background-color: #28a745;
    color: white;
}

.btn-export:hover {
    background-color: #218838;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    table-layout: fixed;
}

.data-table th,
.data-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    word-break: break-word;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.data-table th:nth-child(1) { width: 100px; }
.data-table th:nth-child(2) { width: 120px; }
.data-table th:nth-child(3) { width: 150px; }
.data-table th:nth-child(4) { width: 100px; }
.data-table th:nth-child(5) { width: 80px; }
.data-table th:nth-child(6) { width: 200px; }

.data-table td:last-child {
    white-space: nowrap;
}

.btn-action {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    text-decoration: none;
    margin-right: 0.5rem;
    font-size: 0.9rem;
    min-width: 50px;
    text-align: center;
}

.btn-action.enable {
    background-color: #28a745;
    color: white;
}

.btn-action.disable {
    background-color: #dc3545;
    color: white;
}

.btn-action.view {
    background-color: #17a2b8;
    color: white;
}

.btn-action.edit {
    background-color: #ffc107;
    color: #212529;
}

.btn-action.toggle {
    background-color: #6c757d;
    color: white;
}

.status-active {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #28a745;
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
}

.status-inactive {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #dc3545;
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* 以下样式与employee.css保持一致 */
.search-filter {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.button-row {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-search {
    background-color: #4a6cf7;
    color: white;
    border: none;
}

.btn-reset {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #ddd;
}

/* 分页组件样式修复 */
.pagination {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
}

.pagination li {
    display: inline-block;
}

.pagination a {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    color: #4a6cf7;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: #f8f9fa;
}

.pagination .active a {
    background-color: #4a6cf7;
    color: white;
    border-color: #4a6cf7;
}

.btn-back {
    background-color: #6c757d;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    .form-group {
        width: 100%;
    }
}

/* 提示消息样式 */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.15s linear;
}

.alert.show {
    opacity: 1;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert .close {
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

.delete {
    color: #dc3545;
    border: 1px solid #dc3545;
}

.delete:hover {
    background-color: #dc3545;
    color: white;
}